package operation;

import book.BookList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ling
 * Date: 2022-04-14
 * Time: 20:26
 */
public class ExitOperation implements IOperation{

    @Override
    public void work(BookList bookList) {
        System.out.println("退出系统");
        int currenSize= bookList.getUsedSize();
        for (int i = 0; i < currenSize; i++) {
            bookList.setBooks(i,null);
        }
        System.exit(0);
    }
}
